import type { Ref } from 'vue'

export default function useLoadingFetch(loading: Ref<boolean>, cb: () => void) {
  loading.value = true
  try {
    cb()
  } finally {
    loading.value = false
  }
}
